package main

import (
	"container/list"
	"fmt"
)

func main() {
	//// 初始化
	//queue := list.New()
	//stack := list.New()
	//
	//// 入队 入栈
	//queue.PushBack(123)
	//stack.PushBack(123)
	//
	//// 出队 出栈 返回的数据是结构类型 Value 需要断言成相应的类型
	//num1 := queue.Front()
	//queue.Remove(num1)
	//
	//num2 := queue.Back()
	//stack.Remove(num2)

	queue := list.New()
	haha := queue.PushBack("haha")
	fmt.Println("push haha:", haha)
	don := queue.PushBack("don")
	fmt.Println("push don:", don)
	fmt.Println("111:", queue)
	rls1 := queue.Front()
	queue.Remove(rls1)
	fmt.Println("222:", rls1.Value)
	rls2 := queue.Front()
	fmt.Println("333:", rls2.Value)
	rls3 := queue.Back()
	fmt.Println("444:", rls3)
	fmt.Println("111:", queue)
}
